package com.hnhegui.backend.config;

import com.hnhegui.backend.config.properties.JwtProperties;
import com.hnhegui.backend.util.JwtUtil;
import com.hnhegui.backend.util.RedisUtil;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableConfigurationProperties(JwtProperties.class)
@Configuration
public class AuthAutoConfiguration {

    @Bean
    public JwtUtil jwtUtil(RedisUtil redisUtil, JwtProperties jwtProperties) {
        return new JwtUtil(jwtProperties, redisUtil);
    }
}
